package com.glsc.ngateway.platform.repo.costallocation;

import com.glsc.ngateway.platform.domain.costallocation.HisIpInfo;
import com.glsc.ngateway.platform.domain.costallocation.IpInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

@Repository
public interface HisIpInfoRepo extends JpaRepository<HisIpInfo, Long>, JpaSpecificationExecutor<HisIpInfo> {
    @Query(value = "select t from HisIpInfo t where t.id = :id ")
    HisIpInfo queryByid(@Param("id") Long id);

    @Query(value = "select t from HisIpInfo t where t.id in :ids ")
    List<HisIpInfo> queryByids(@Param("ids") Set<Long> ids);

    @Query(value = "select t from HisIpInfo t where t.uniqueKey in :uniquekeySet ")
    List<HisIpInfo> queryByUniquekeys(@Param("uniquekeySet") Set<String> uniquekeySet);
}
